import './main.less';
$(function () {
    const href = window.location.href.match(/\/[a-z]+\./);
    $('.left-menu-wrap .nav li').each((i, ele) => {
        $(ele).removeClass('active');
        if ($(ele).find('a').attr('href') == href + 'html') {
            $(ele).addClass('active');
        }
    });
});

(function ($) {
    $.fn.bigbear = function (opts) {
        opts = $.extend({}, $.fn.bigbear.defaults, opts);
        return this.each(function () {
            var elem = $(this);
            elem.find("span").text(opts["title"]);
        });
    };
    $.fn.bigbear.defaults = {
        title: "这是一个简单的测试"
    };
})(jQuery);

$(function () {
    $("#bb").bigbear();
});